<template>
  <div class="newinfo">
    <!-- 内容展示 -->
    <van-panel :title="newInfo.zhaiyao" :status="'阅读'+newInfo.click" class="info">
      <div>{{newInfo.content}}</div>
    </van-panel>
    <comment :id="id"></comment>
  </div>
</template>

<script>
import { getNew } from '@/api/newinfo'
import Comment from '../../../components/comment'
export default {
  props: ['id'],
  data () {
    return {
      newInfo: '',
      commentList: []
    }
  },
  created () {
    this.getNew();
  },
  methods: {
    async getNew () {
      const res = await getNew(this.id)
      this.newInfo = res.data.message
      console.log(res)
    }
  },
  components: {
    comment: Comment
  }
}
</script>

<style lang='scss'>
.newinfo {
  padding: 0 10px;
  .info {
    .van-cell__title {
      font-weight: 600;
      flex: 2;
    }
  }
  .van-cell__value {
    color: red;
  }
  .van-panel__content {
    font-size: 14px;
    text-indent: 2em;
  }
}
</style>